package cn.lingyangwl.agile.infra.weixin.mp.manager;

import cn.lingyangwl.agile.infra.weixin.mp.mapper.MpTagMapper;
import cn.lingyangwl.agile.infra.weixin.mp.model.entity.MpTag;
import cn.lingyangwl.framework.mybatis.mate.annotations.FieldUniqueCheck;
import cn.lingyangwl.framework.mybatis.mate.enums.OperationTypeEnum;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

/**
 * 公众号标签 仓储层
 *
 * @author shenguangyang
 */
@Slf4j
@Repository
public class MpTagManager extends ServiceImpl<MpTagMapper, MpTag>
    implements IService<MpTag> {

    @FieldUniqueCheck(type = OperationTypeEnum.SAVE)
    public boolean saveMpTag(MpTag entity) {
        return this.save(entity);
    }

    @FieldUniqueCheck(type = OperationTypeEnum.UPDATE)
    public boolean updateMpTag(MpTag entity) {
        return this.updateById(entity);
    }
}
